package org.tedu.aopdemo.aop;

public class CalculatorImpl implements Calculator {
    @Override
    public int add(int a, int b) {
        int result = a + b;
        return result;
    }

    @Override
    public int sub(int a, int b) {
        int result = a - b;
        return result;
    }

    @Override
    public int mul(int a, int b) {
        int result = a * b;
        return result;
    }

    @Override
    public int div(int a, int b) {
        if (b == 0) {
            throw new RuntimeException("除数不能为0");
        }
        int result = a / b;
        return result;
    }
}
